import api from "@/libs/request";

/**
 * 获取默认协议
 */
export const robotLogin = (data: any) => {
  return api.post(`/solitaire/weChat/boot/login`, data);
};

/**
 * 发布接龙活动
 */
export const addActivity = (data: any) => {
  return api.post(`/solitaire/manager/activity/add`, data);
};

/**
 * 获取接龙数据
 */
export const getActivityList = (data: any) => {
  return api.get(`/solitaire/manager/activity/list`, data);
};

/**
 * 关闭接龙活动
 */
export const closeActivityById = (id: any, data: any) => {
  return api.put(`/solitaire/manager/activity/changeStatus/${id}`, data);
};

/**
 * 删除接龙活动
 */
export const delActivityById = (id: any, data: any) => {
  return api.delete(`/solitaire/manager/activity/delete/${id}`, data);
};

/**
 * 获取单个接龙活动信息
 */
export const getActivityById = (id: any, data: any) => {
  return api.get(`/solitaire/manager/activity/get/${id}`, data);
};

/**
 * 编辑单个接龙活动信息
 */
export const editActivityById = (data: any) => {
  return api.put(`/solitaire/manager/activity/update`, data);
};

/**
 * 转发当前接龙信息
 */
export const transFormActivityById = (activityId: any, data: any) => {
  return api.get(
    `/solitaire/api/weChat/current/activity/product/${activityId}`,
    data,
  );
};

/**
 * 获取接龙设置信息
 */
export const getActivitySetting = (data: any) => {
  return api.get(`/solitaire/manager/info/get`, data);
};

/**
 * 手动控制关闭接龙状态
 */
export const changeActivitySetting = (data: any) => {
  return api.post(`/solitaire/manager/info/save`, data);
};
